<%@ page import="com.lagou.model.User" %><%--
  Created by IntelliJ IDEA.
  User: oyz
  Date: 2021/4/19
  Time: 14:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>主页面</title>

</head>
<link rel="stylesheet" href="css/bootstrap.css"/>
<body style="padding:100px">
<h1>登录成功。欢迎<%=((User)session.getAttribute("user")).getUserName()%>使用</h1>

<button class="btn btn-info" id="user_add" data-toggle="modal" data-target="#myModal">新增</button>
<button class="btn btn-info" id="user_edit" data-toggle="modal" data-target="#myModal">编辑</button>
<button class="btn btn-info" id="user_delete">删除</button>
<button class="btn btn-info" id="user_find">查询</button>
<input placeholder="按照工号进行查询" style="width:140px" id="id">
<%--<input placeholder="按照姓名进行查询" style="width:140px" id="name">--%>
<table class="table table-striped">
    <thead>
    <tr>
        <th>序号</th>
        <th>id</th>
        <th>姓名</th>
        <th>性别</th>
        <th>出生日</th>
        <th>邮箱</th>
        <th>备注</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="allUser" items="${requestScope.allStudent}">
        <tr class="warning">
            <td ><input type="checkbox"  class="xiugai"></td>
            <td id="code">${allUser.id}</td>
            <td id="userName">${allUser.name}</td>
            <td id="sex">${allUser.sex}</td>
            <td id="birthday">${allUser.birthday}</td>
            <td id="mail">${allUser.mail}</td>
            <td id="remark">${allUser.remark}</td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<!-- 模态框（Modal） -->
<div class="modal " id="myModal" data-backdrop="static">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button class="close" data-dismiss="modal" aria-hidden="true">
                    <span>&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">

                </h4>
            </div>
            <div class="modal-body" id="modal-body">
                <label for="name">工号:</label>
                <input type="text" class="form-control" id="m_code" placeholder="请输入id">
                <label for="name">姓名:</label>
                <input type="text" class="form-control" id="m_userName" placeholder="请输入姓名">
                <label for="name">性别:</label>
                <input type="text" class="form-control" id="m_sex" placeholder="请输入性别">
                <label for="name">生日:</label>
                <input type="text" class="form-control" id="m_birthday" placeholder="请输入生日">
                <label for="name">邮箱:</label>
                <input type="text" class="form-control" id="m_email" placeholder="请输入邮箱">
                <label for="name">备注:</label>
                <input type="text" class="form-control" id="m_remark" placeholder="请输入备注">
            </div>
            <div class="modal-footer">
                <button id="save" class="btn btn-default" data-dismiss="modal">保存</button>
                <button type="button" class="btn btn-primary">提交更改</button>
            </div>
        </div><!-- /.modal-content -->
    </div>
</div>
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/code.js"></script>
    <%--<script>
        $("#add").click(function(){
            window.open ('addStudent.jsp', 'newWindow', 'height=700, width=600, top=100, left=200, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no')
        });
    </script>--%>
</body>

</html>
